﻿<%@ Page Language="C#" MasterPageFile="~/Main.master" AutoEventWireup="true" CodeFile="GrantApplicationWizardView.aspx.cs" Inherits="AddGrantWizardView" Title="Untitled Page" %>

<%@ Register Assembly="Liberty.Controls" Namespace="Liberty.Controls.WebControls"
    TagPrefix="cc1" %>

<%@ Register src="ServiceMemberManagement/Controls/ServiceMemberEditView.ascx" tagname="ServiceMemberEditView" tagprefix="uc1" %>
<%@ Register src="CaseManagement/Controls/CaseEditView.ascx" tagname="CaseEditView" tagprefix="uc2" %>
<%@ Register src="GrantManagement/Controls/GrantEditView.ascx" tagname="GrantEditView" tagprefix="uc3" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <script type="text/javascript">
        var onAjaxPostBack = false;
        function SetPostbackControl()
        {
            var startButtonID = wizardClientID + "_StartNavigationTemplateContainerID_StartNextButton";
            var stepButtonID = wizardClientID + "_StepNavigationTemplateContainerID_StepNextButton";
            var finishButtonID = wizardClientID + "_FinishNavigationTemplateContainerID_FinishButton";
            var validatorID = ( document.getElementById( startButtonID ) ) ? startButtonID :
                ( document.getElementById( stepButtonID ) ) ? stepButtonID : finishButtonID;
            validationRuleSet.set_PostbackControl( validatorID );
            validationRuleSet.Execute();
        }
    </script>
    <script language="javascript" type="text/javascript" src="Scripts/GrantEditView.js"></script>
    <script language="javascript" type="text/javascript" src="Scripts/DateFormat.js"></script>
    <script language="javascript" type="text/javascript" src="Scripts/CaseEditView.js"></script>
    <script language="javascript" type="text/javascript" src="Scripts/ValidationSummaryPostback.js"></script>

    <div id="GrantView" class="PageContent">
        <asp:Label ID="lblRequiredFieldsNote" runat="server">Required fields are shown in <b>bold</b>. The Next button will be enabled when you provide all required information in correct format.</asp:Label>
        <br /><br />
        <asp:Wizard ID="wizAddGrant" 
            runat="server"
            EnableTheming="true" 
            SkinID="DefaultWizard" 
            ActiveStepIndex="0" 
            DisplayCancelButton="true"
            DisplaySideBar="false"
            OnNextButtonClick="cmdNext_Clicked"
            HeaderText="Grant Application Wizard" 
            onfinishbuttonclick="wizAddGrant_FinishButtonClick">
            <WizardSteps>
                <asp:WizardStep ID="wsServiceMemberEditView" runat="server" Title="Step 1 - Add a New Service Member" StepType="Auto">
                    <uc1:ServiceMemberEditView ID="ucServiceMemberEditView" runat="server" />
                </asp:WizardStep>
                <asp:WizardStep ID="wsCaseEditView" runat="server" Title="Step 2 - Add a New Case" StepType="Auto">
                    <uc2:CaseEditView ID="ucCaseEditView" runat="server" />
                </asp:WizardStep>
                <asp:WizardStep ID="wsGrantEditView" runat="server" Title="Step 3 - Apply for a Grant" StepType="Auto">
                    <uc3:GrantEditView ID="ucGrantEditView" runat="server" />
                </asp:WizardStep>
            </WizardSteps>
        </asp:Wizard>
        <cc1:PageValidator ID="PageValidator1" runat="server" />
    </div>
</asp:Content>

